<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>navigator对象</title>
</head>

<body>
    <script>
        console.log(navigator);
        // 检测浏览器版本以及平台
        console.log(navigator.userAgent);
    </script>
</body>

</html>